<!DOCTYPE html>
<html lang="en">

<head>
    <!-- 页面meta -->

    <meta charset="utf-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <title>后台管理</title>

    <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">

    <!-- 引入样式 -->

    <link rel="stylesheet" href="../plugins/elementui/index.css">
    <link rel="stylesheet" href="../plugins/font-awesome/css/font-awesome.min.css">

    <link rel="stylesheet" href="../css/mystyle.css">

    <link rel="stylesheet" href="../plugins/">

    <!-- 引入组件库 -->

    <script src="../js/vue.js"></script>

    <script src="../plugins/elementui/index.js"></script>

    <script type="text/javascript" src="../js/jquery.min.js"></script>

    <script src="../js/axios-0.18.0.js"></script>

    <script src="../http/request.js"></script>


</head>
<style>
    .bigbox {
        width: 1000px;
        height: auto;
        margin: 40px 20px;
        float: left;
    }

    .rightbox {
        width: 700px;
        height: auto;
        margin: 50px 900px;
        float: right;
    }

    .father {
        width: 100%;
        height: 100%;
    }

    .demo-image__container {
        display: flex;
        /* 使用 Flex 布局 */
        flex-direction: row;
        /* 设置横向排列 */
    }

    .demo-image {
        margin-right: 10px;
        /* 可选，用于添加间距 */
    }
</style>

<body>

    <div id="app" class="bigbox">
        <el-button type="primary" @click="exit()">返回</el-button>

        <el-form ref="form" :model="form" size='medium' label-width="80px">
            <el-form-item label="订单号">
                <el-input v-model="form.number"></el-input>
            </el-form-item>
            <el-form-item label="订单类型">
                <el-input v-model="form.productId"></el-input>
            </el-form-item>
            <el-form-item label="悬赏">
                <el-input v-model="form.amount"></el-input>
            </el-form-item>
            <el-form-item label="订单状态">
                <el-input v-model="form.orderStatus"></el-input>
            </el-form-item>
            <el-form-item label="发单人">
                <el-input v-model="form.openid"></el-input>
            </el-form-item>
            <el-form-item label="发单电话">
                <el-input v-model="form.phone"></el-input>
            </el-form-item>
            <el-form-item label="创建时间">
                <el-input v-model="form.createTime"></el-input>
            </el-form-item>
            <el-form-item label="更新时间">
                <el-input v-model="form.updateTime"></el-input>
            </el-form-item>
            <el-form-item label="预期时间">
                <el-input v-model="form.expectTime"></el-input>
            </el-form-item>
            <el-form-item label="完成时间">
                <el-input v-model="form.finishTime"></el-input>
            </el-form-item>
            <el-form-item label="优惠券">
                <el-input v-model="form.couponId"></el-input>
            </el-form-item>
            <el-form-item label="取件地址">
                <el-input v-model="form.takeAddress"></el-input>
            </el-form-item>
            <el-form-item label="取件信息">
                <el-input v-model="form.packageInfo"></el-input>
            </el-form-item>
            <el-form-item label="备注">
                <el-input v-model="form.remark"></el-input>
            </el-form-item>
            <el-form-item label="送达地址">
                <el-input v-model="form.address"></el-input>
            </el-form-item>
            <el-form-item label="接单人">
                <el-input v-model="form.takeOpenid"></el-input>
            </el-form-item>
            <el-form-item label="接单电话">
                <el-input v-model="form.takePhone"></el-input>
            </el-form-item>
            <el-form-item label="接单时间">
                <el-input v-model="form.takeOrderTime"></el-input>
            </el-form-item>
            <el-form-item label="送达时间">
                <el-input v-model="form.deliveryTime"></el-input>
            </el-form-item>
            <el-form-item label="取件图片">
                <div class="demo-image__container">
                    <el-image v-for="img in srcList" :key="img" class="demo-image" :src="img"
                        :preview-src-list="srcList">
                    </el-image>
                </div>
            </el-form-item>
            <!-- <el-form-item label="取件图片">
                <div class="demo-image__preview" v-for='img in srcList' :key="img">
                    <el-image style="width: 100px; height: 100px" :src="img" :preview-src-list="srcList">
                    </el-image>
                </div>
            </el-form-item> -->
        </el-form>


    </div>





</body>

<script>
    var vue = new Vue({
        el: '#app',
        data() {
            return {
                form: {},
                srcList: []
            }
        },
        //钩子函数，VUE对象初始化完成后自动执行
        mounted() {
            const url = window.location.search
            const id = new URLSearchParams(url)
            this.getAll(id);
        },
        methods: {

            //列表
            getAll(id) {
                console.log(id)
                //发送ajax请求
                axios.get("/order/getAllInfo?" + id).then((res) => {
                    console.log(res.data)
                    this.form = res.data;
                    this.srcList = res.data.imgUrls

                    // console.log("dataList" + JSON.stringify(this.dataList))
                });
            },
            onSubmit() {
                console.log('submit!');
            },
            exit() {
                window.location.href = '../page/order.html'
            }
        }

    })
</script>

</html>